import React, { PureComponent } from "react"
import SwiperJs from "swiper/dist/js/swiper"
import "swiper/dist/css/swiper.css"
import { SwiperWrap } from "@/components/main/index/section/styled"

class Swiper extends PureComponent {
    render() {
        // console.log(this.props);
        
        return (
            <SwiperWrap height={this.props.height} >
                <div className="swiper-container">
                    <div className="swiper-wrapper">
                        {this.props.children}
                    </div>
                </div>
            </SwiperWrap>
                )
        }
        componentDidMount(){
            this.swiperInit.bind(this)()
        }
        swiperInit(){
            setTimeout(() => {
                new SwiperJs('.swiper-container',this.props.swiperConfig)
                
            }, 80);
           
        }
}

export default Swiper;